package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.PtTurntablePageEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.util.List;

/**
 * 大转盘显示位置页面表 动态查询条件
 *
 * @author pbuilder generated
 * @version 2.0
 * @date 2021-12-15 14:02:44
 */
@JsonInclude(Include.NON_NULL)
public class PtTurntablePageQuery extends PtTurntablePageEntity implements Query<PtTurntablePageEntity> {


    private List<String> turntableIds;


    /**
     * id查询条件
     */
    @JsonUnwrapped(prefix = "id")
    private Condition<String> idCondition;

    /**
     * 大转盘ID查询条件
     */
    @JsonUnwrapped(prefix = "pointTurntableId")
    private Condition<String> pointTurntableIdCondition;

    /**
     * 显示位置标识查询条件
     */
    @JsonUnwrapped(prefix = "pageCode")
    private Condition<String> pageCodeCondition;

    /**
     * 显示位置名称查询条件
     */
    @JsonUnwrapped(prefix = "pageName")
    private Condition<String> pageNameCondition;

    public List<String> getTurntableIds() {
        return turntableIds;
    }

    public void setTurntableIds(List<String> turntableIds) {
        this.turntableIds = turntableIds;
    }

    /**
     * 构造一个查询条件对象
     */
    public PtTurntablePageQuery() {
        super();
    }

    /**
     * 依据实体对象构造一个查询条件对象
     *
     * @param entity 实体对象
     */
    public PtTurntablePageQuery(PtTurntablePageEntity entity) {
        super(entity);
    }

    /**
     * 依据其它查询条件对象的信息构造一个查询条件对象
     *
     * @param other 查询条件对象
     */
    public PtTurntablePageQuery(PtTurntablePageQuery other) {
        super(other);
        if (other.idCondition != null) {
            this.idCondition = other.idCondition.copy();
        }
        if (other.pointTurntableIdCondition != null) {
            this.pointTurntableIdCondition = other.pointTurntableIdCondition.copy();
        }
        if (other.pageCodeCondition != null) {
            this.pageCodeCondition = other.pageCodeCondition.copy();
        }
        if (other.pageNameCondition != null) {
            this.pageNameCondition = other.pageNameCondition.copy();
        }
    }

    @Override
    public QueryWrapper<PtTurntablePageEntity> toQueryWrapper() {
        QueryWrapper<PtTurntablePageEntity> wrapper = new QueryWrapper<>(this);
        if (idCondition != null) {
            idCondition.toWrapper(wrapper, COL_ID);
        }
        if (pointTurntableIdCondition != null) {
            pointTurntableIdCondition.toWrapper(wrapper, COL_POINT_TURNTABLE_ID);
        }
        if (pageCodeCondition != null) {
            pageCodeCondition.toWrapper(wrapper, COL_PAGE_CODE);
        }
        if (pageNameCondition != null) {
            pageNameCondition.toWrapper(wrapper, COL_PAGE_NAME);
        }
        return wrapper;
    }

    /**
     * 构造并返回id查询条件
     *
     * @return idCondition id查询条件
     */
    public Condition<String> id() {
        this.idCondition = new Condition<>();
        return this.idCondition;
    }

    /**
     * 获取id查询条件
     *
     * @return idCondition id查询条件
     */
    public Condition<String> getIdCondition() {
        return idCondition;
    }

    /**
     * 设置id查询条件
     *
     * @param idCondition id查询条件
     */
    public void setIdCondition(Condition<String> idCondition) {
        this.idCondition = idCondition;
    }

    /**
     * 构造并返回大转盘ID查询条件
     *
     * @return pointTurntableIdCondition 大转盘ID查询条件
     */
    public Condition<String> pointTurntableId() {
        this.pointTurntableIdCondition = new Condition<>();
        return this.pointTurntableIdCondition;
    }

    /**
     * 获取大转盘ID查询条件
     *
     * @return pointTurntableIdCondition 大转盘ID查询条件
     */
    public Condition<String> getPointTurntableIdCondition() {
        return pointTurntableIdCondition;
    }

    /**
     * 设置大转盘ID查询条件
     *
     * @param pointTurntableIdCondition 大转盘ID查询条件
     */
    public void setPointTurntableIdCondition(Condition<String> pointTurntableIdCondition) {
        this.pointTurntableIdCondition = pointTurntableIdCondition;
    }

    /**
     * 构造并返回显示位置标识查询条件
     *
     * @return pageCodeCondition 显示位置标识查询条件
     */
    public Condition<String> pageCode() {
        this.pageCodeCondition = new Condition<>();
        return this.pageCodeCondition;
    }

    /**
     * 获取显示位置标识查询条件
     *
     * @return pageCodeCondition 显示位置标识查询条件
     */
    public Condition<String> getPageCodeCondition() {
        return pageCodeCondition;
    }

    /**
     * 设置显示位置标识查询条件
     *
     * @param pageCodeCondition 显示位置标识查询条件
     */
    public void setPageCodeCondition(Condition<String> pageCodeCondition) {
        this.pageCodeCondition = pageCodeCondition;
    }

    /**
     * 构造并返回显示位置名称查询条件
     *
     * @return pageNameCondition 显示位置名称查询条件
     */
    public Condition<String> pageName() {
        this.pageNameCondition = new Condition<>();
        return this.pageNameCondition;
    }

    /**
     * 获取显示位置名称查询条件
     *
     * @return pageNameCondition 显示位置名称查询条件
     */
    public Condition<String> getPageNameCondition() {
        return pageNameCondition;
    }

    /**
     * 设置显示位置名称查询条件
     *
     * @param pageNameCondition 显示位置名称查询条件
     */
    public void setPageNameCondition(Condition<String> pageNameCondition) {
        this.pageNameCondition = pageNameCondition;
    }

}
